package com.project.restaurant.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* <p>
*
* </p>
*
* @author 作者
* @since 2022-10-11
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("r_order_detail_item")
public class OrderDetailItem extends Model<OrderDetailItem> {

private static final long serialVersionUID = 1L;

    /**
    * 订单购买项id，订单里的购买项
    */
    @TableId(value = "item_id", type = IdType.ASSIGN_ID)
    private Long itemId;

    /**
    * 订单id，该购买项归属的订单，即订单的唯一标识
    */
    private String orderId;

    /**
    * 餐点id
    */
    private Integer mealId;

    /**
    * 下单时餐点的单位价格
    */
    private Integer purchasingMealPrice;

    /**
    * 购买的数量
    */
    private Integer purchaseNum;


    @Override
    public Serializable pkVal() {
    return this.itemId;
    }

}
